﻿using System.Collections.Generic;

namespace OpenCompiler.AST
{
	public class AdornmentableStatement<T> : VisibilityStatement<T>
		where T:class
	{
		internal AdornmentableStatement(Statement parent, string name)
			: base(parent, name)
		{
			this.Attributes = new List<AttributeStatement>();
		}

		public List<AttributeStatement> Attributes { get; private set; }


		public T Attribute(string name)
		{
			var ats  = new AttributeStatement(this, name);
			this.Attributes.Add(ats);
			return this as T;
		}
	}
}
